<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }
        
        div {
            width: 400px;
            height: 300px;
            border: 1px solid black;
            margin: auto;
            margin-top: 80px;
        }
        
        .box {
            width: 100px;
            height: 100px;
            background-color: blueviolet;
        }
        
        .box1 {
            /* transform: translateX(100px);
            transform: translateY(-100px); */
            /* transform: translateX(100px) translateY(-100px); */
            /* transform: translate(100px); */
            background-color: blueviolet;
            transform: translateX(-100px) translateY(-50px);
        }
        
        .box2 {
            background-color: brown;
        }
    </style>
</head>

<body>
    <div>
        <p class="box box1"></p>
        <p class="box box2"></p>
    </div>
</body>

</html>